package com.example.rabbitmq.consumer;

import com.example.rabbitmq.config.RabbitConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 一个生产者可以有多个消费者，并且分发是负载均衡的
 * 处理器A
 * @date 2019-4-8 12:18:35
 * @author joker
 */
@Slf4j
@Component
@RabbitListener(queues = RabbitConfig.QUEUE_A)
public class MsgReceiverOne {

    @RabbitHandler
    public void process(String content){
        log.info("处理器A接收处理队列A的消息：{}", content);
    }
}
